package com.education.welco.service.impl;

import java.util.List;

import com.education.common.utils.Convert;
import com.education.welco.mapper.SResourceClassMapper;
import com.education.welco.pojo.SResourceClass;
import com.education.welco.service.ISResourceClassService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 资源查看班级 服务层实现
 *
 * @author d
 * @date 2020-05-13
 */
@Service
public class SResourceClassServiceImpl implements ISResourceClassService {

    @Autowired
    private SResourceClassMapper sResourceClassMapper;

    /**
     * 查询资源查看班级信息
     *
     * @param id 资源查看班级ID
     * @return 资源查看班级信息
     */
    @Override
    public SResourceClass selectSResourceClassById(Integer id) {
        return sResourceClassMapper.selectSResourceClassById(id);
    }

    /**
     * 查询资源查看班级列表
     *
     * @param sResourceClass 资源查看班级信息
     * @return 资源查看班级集合
     */
    @Override
    public List<SResourceClass> selectSResourceClassList(SResourceClass sResourceClass) {
        return sResourceClassMapper.selectSResourceClassList(sResourceClass);
    }

    /**
     * 新增资源查看班级
     *
     * @param sResourceClass 资源查看班级信息
     * @return 结果
     */
    @Override
    public int insertSResourceClass(SResourceClass sResourceClass) {
        return sResourceClassMapper.insertSResourceClass(sResourceClass);
    }

    /**
     * 修改资源查看班级
     *
     * @param sResourceClass 资源查看班级信息
     * @return 结果
     */
    @Override
    public int updateSResourceClass(SResourceClass sResourceClass) {
        return sResourceClassMapper.updateSResourceClass(sResourceClass);
    }

    /**
     * 删除资源查看班级
     *
     * @param resourceId 资源查看班级ID
     * @return 结果
     */
    @Override
    public int deleteSResourceClassByresourceId(Integer resourceId) {
        return sResourceClassMapper.deleteSResourceClassByresourceId(resourceId);
    }

    @Override
    public int insertSResourceClassList(List<SResourceClass> resourceClassList) {
        return sResourceClassMapper.insertSResourceClassList(resourceClassList);
    }

    /**
     * 删除资源查看班级对象
     *
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteSResourceClassByIds(String ids) {
        return sResourceClassMapper.deleteSResourceClassByIds(Convert.toStrArray(ids));
    }
}